<?php
//自定义导航
class WebMenuModel extends Model {
	var $_table = 'web_menu';
	
	var $menu_id_nak; //INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '菜单编号',
	var $menu_name_sr; //VARCHAR(16) NOT NULL COMMENT '模板中的引用名',
	var $menu_title_sr; //VARCHAR(64) NOT NULL COMMENT '菜单标题',
	var $menu_default_nr = 0; //TINYINT(1) NOT NULL DEFAULT 0,
	

	public function check_menu_name($value, $data) {
		$where ['menu_name'] = $value;
		if (isset ( $data ['menu_id'] )) {
			$where ['menu_id != '] = $data ['menu_id'];
		}
		return $this->exist ( $where ) ? "导航菜单已经存在" : true;
	}
}